#ifndef VLCPLAYER_H
#define VLCPLAYER_H

#include <QDeclarativeItem>
#include <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_player.h>
#include <phonon/videoplayer.h>
#include <QGraphicsProxyWidget>

class VlcPlayer : public QDeclarativeItem
{
    Q_OBJECT
    Q_PROPERTY(QString media READ media WRITE setMedia)


public:
    explicit VlcPlayer(QDeclarativeItem *parent = 0);
    Q_INVOKABLE void start();
    void startVcl();
    void setMedia(const QString media);
    QString media() const;

private slots:
    void refreshGeometry();

private:
    QWidget *vlcvideo;
    QString m_name;
    libvlc_instance_t * inst;
    libvlc_media_player_t * mp;
    libvlc_media_t * m;

    Phonon::VideoPlayer * phPlayer;
    QGraphicsProxyWidget * proxy;

};

#endif // VLCPLAYER_H
